<?php /* Smarty version 2.6.18, created on 2016-12-13 15:12:49
         compiled from score/folstudent.tpl.php */ ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.header.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.left.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>
  <!--主要内容开始-->
<div class="content-wrapper">
    <section class="content">
        <div class="row">
            <!--树状图-->
            <section class="col-lg-2 connectedSortable" style=" padding-right:0px; margin-bottom:10px;">
                <div class="sidebar" style="background-color:#fff; padding-bottom:0px;">
                    <ul class="sidebar-menu" id="chan">
                        <?php $_from = $this->_tpl_vars['grade_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                        <li class="treeview <?php if ($this->_tpl_vars['value']['grade_id'] == $this->_tpl_vars['grade_id']): ?>active<?php endif; ?>">
                            <a href="#">
                                <i class="glyphicon glyphicon-align-left"></i><span><?php echo $this->_tpl_vars['value']['grade_name']; ?>
</span> <i class="fa fa-angle-left pull-right"></i>
                            </a>
                            <ul class="treeview-menu" style="background-color:#fff;">
                                <?php $_from = $this->_tpl_vars['value']['class_name']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
?>
                                    <li <?php if ($this->_tpl_vars['k'] == $this->_tpl_vars['class_id']): ?>class="active"<?php endif; ?>>
                                        <a href="index.php?a=score.folstudent&class_id=<?php echo $this->_tpl_vars['k']; ?>
">
                                            <i class="fa fa-angle-right"><?php echo $this->_tpl_vars['v']; ?>
</i>
                                        </a>
                                    </li>
                                <?php endforeach; endif; unset($_from); ?>
                            </ul>
                        </li>
                        <?php endforeach; endif; unset($_from); ?>
                    </ul>
                </div>
            </section>
            <!--树状图结束-->
            <section class="col-lg-10 connectedSortable">
                <div class="box box-default box-solid">
                    <form action="" method="get">
                        <div class="box-header with-border">
                            <span class="fa fa-step-forward" style="float:left; font-size:18px; padding-top:3px; color:#3c8dbc;" ></span>
                            <p class="box-title">学生成绩质量跟踪</p>
                        </div>
                        <div class="box-body">
                            <div class="col-md-2 form-group">
                                <label class="col-sm-5 control-label text-right" style="padding:0;">
                                    姓名：
                                </label>
                                <div class="input-group col-sm-7 col-xs-12">
                                    <select class="form-control" name="student_id"  style="padding:0;">
                                        <?php $_from = $this->_tpl_vars['student_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                        <option value="<?php echo $this->_tpl_vars['value']['student_id']; ?>
"><?php echo $this->_tpl_vars['value']['student_name']; ?>
</option>
                                        <?php endforeach; endif; unset($_from); ?>
                                    </select>
                                </div>
                            </div>
                            <div class="col-md-5 col-xs-12 form-group" style="padding:0;">
                                <label class="col-sm-1 control-label text-right">
                                    从
                                </label>
                                <div class="input-group col-md-5" style="float:left;">
                                    <select class="form-control" id="semester_id" name="semester_id1">
                                        <option value="0">-请选择-</option>
                                        <?php $_from = $this->_tpl_vars['semester_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                        <option value="<?php echo $this->_tpl_vars['value']['semester_id']; ?>
"><?php echo $this->_tpl_vars['value']['semester_name']; ?>
</option>
                                        <?php endforeach; endif; unset($_from); ?>
                                    </select>
                                </div>
                                <span style="float:left; font-weight:bold;">  至 </span >
                                <div class="input-group col-md-5" >
                                    <select class="form-control" id="semester_id" name="semester_id2">
                                        <option value="0">-请选择-</option>
                                        <?php $_from = $this->_tpl_vars['semester_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                        <option value="<?php echo $this->_tpl_vars['value']['semester_id']; ?>
"><?php echo $this->_tpl_vars['value']['semester_name']; ?>
</option>
                                        <?php endforeach; endif; unset($_from); ?>
                                    </select>
                                </div>
                            </div>
                            <div class="col-md-2 form-group">
                                <div class="input-group col-sm-12 col-xs-6">
                                    <select class="form-control"  name="exam_type">
                                        <?php $_from = $this->_tpl_vars['exam_type_ini']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                        <option value="<?php echo $this->_tpl_vars['key']; ?>
"><?php echo $this->_tpl_vars['value']; ?>
</option>
                                        <?php endforeach; endif; unset($_from); ?>
                                        <option value="all">全部考</option>
                                    </select>
                                </div>
                                </div>
                            <div class="col-md-2 form-group">
                                <div class="input-group col-sm-12 col-xs-6" style="float:left; margin-right:8px;">
                                    <select class="form-control"  name="rank_type">
                                        <option value="0">班排名</option>
                                        <option value="1">级排名</option>
                                    </select>
                                </div>

                            </div>
							<div class="col-md-1 form-group">
                           
                            <input type="hidden" name="a" value="score.folstudent">
                            <input type="submit" value="确定" class="btn btn-primary">
							</div>
                            <table class="table table-bordered table-bordered"  id="mytable">
                                <thead>
                                <tr style="background-color:#fcb53f;">
                                    <td>学号</td>
                                    <td>姓名</td>
                                    <td>学年学期</td>
                                    <td>考试</td>
                                    <td>总分</td>
                                    <td>排名</td>
                                    <?php $_from = $this->_tpl_vars['subject_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                    <td><?php echo $this->_tpl_vars['value']['subject_name']; ?>
</td>
                                    <td>排名</td>
                                    <?php endforeach; endif; unset($_from); ?>
                                </tr>
                                </thead>
                                <?php $_from = $this->_tpl_vars['all']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
                                <tr>
                                    <td><?php echo $this->_tpl_vars['student_data']['student_no']; ?>
</td>
                                    <td><?php echo $this->_tpl_vars['student_data']['student_name']; ?>
</td>
                                    <td><?php echo $this->_tpl_vars['value']['sem']; ?>
</td>
                                    <td><?php echo $this->_tpl_vars['value']['exam']; ?>
</td>
                                    <td><?php echo $this->_tpl_vars['value']['score']; ?>
</td>
                                    <td><?php echo $this->_tpl_vars['value']['rank']; ?>
</td>
                                    <?php $_from = $this->_tpl_vars['value']['sub']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['v']):
?>
                                    <td><?php echo $this->_tpl_vars['v']['score_value']; ?>
</td>
                                    <td><?php echo $this->_tpl_vars['v']['rank']; ?>
</td>
                                    <?php endforeach; endif; unset($_from); ?>
                                </tr>
                                <?php endforeach; endif; unset($_from); ?>

                            </table>
                        </div><!--box-body -->
                        <div class="box-footer">
                            <div class="chartContainer" style="height: 400px; width:90%;"></div>
                        </div>
                    </form>

                </div><!--box box-default box-solid-->
            </section>
        </div><!--row-->
    </section>
</div>
  <!--主要内容结束-->
<?php $_smarty_tpl_vars = $this->_tpl_vars;
$this->_smarty_include(array('smarty_include_tpl_file' => "index.footer.tpl.php", 'smarty_include_vars' => array()));
$this->_tpl_vars = $_smarty_tpl_vars;
unset($_smarty_tpl_vars);
 ?>

<script src="static/js/jquery.canvasjs.min.js"></script>
<script type="text/javascript">
    $(function () {
        $(".chartContainer").CanvasJSChart({
            title: {
                text: "考试排名趋势",
                fontSize: 16
            },
            axisX: {
                gridColor: "Silver",
                tickColor: "silver",
                interval: 10,
            },
            toolTip: {
                shared: true
            },
            data: [
                <?php $_from = $this->_tpl_vars['subject_lists']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['key'] => $this->_tpl_vars['value']):
?>
        {
            showInLegend: true,
                name: "<?php echo $this->_tpl_vars['value']['subject_name']; ?>
",//科目
            type: "line",
            markerType: "square",
            dataPoints: [
            <?php $_from = $this->_tpl_vars['all']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['foo'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['foo']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['k'] => $this->_tpl_vars['v']):
        $this->_foreach['foo']['iteration']++;
?>
            <?php if ($this->_tpl_vars['v']['sub'][$this->_tpl_vars['value']['subject_id']]['rank']): ?> { x: <?php echo $this->_foreach['foo']['iteration']; ?>
0, label: "<?php echo $this->_tpl_vars['v']['exam']; ?>
", y: <?php echo $this->_tpl_vars['v']['sub'][$this->_tpl_vars['value']['subject_id']]['rank']; ?>
 },//考试名称    排名<?php endif; ?>
            <?php endforeach; endif; unset($_from); ?>

        ]
        },
        <?php endforeach; endif; unset($_from); ?>
            ]
        });
    });
</script>